home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 272_01 / exttyp.doc < prev    next >
Text File  |  1987-07-08  |  1KB  |  39 lines

  1.  
  2.  
  3.         NAME
  4.                 exttyp -- check a filename for a particular extension
  5.  
  6.         SYNOPSIS
  7.                 r = exttyp(filename, extn);
  8.                 int r;         returns TRUE if match, else FALSE
  9.                 char *filename  filename to test
  10.                 char *extn      extension string for match
  11.  
  12.         DESCRIPTION
  13.         This function makes no changes to either entry parameter,
  14.         but simply returns TRUE if the specified extension is found in
  15.         the filename, or FALSE (0) if it is not.  Case of the characters is
  16.         ignored.  The function is most useful to insure that a particular
  17.         program will only use an extension of a specified type.
  18.  
  19.         EXAMPLE
  20.              (assume argv[1] is string "foobar.com")
  21.  
  22.              if(exttyp(argv[1], "COM")) printf("File is executable");
  23.              else printf("File is not executable");
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMDLx.LIB for the Datalight Compiler.
  39.